package com.chuangjiangx.member.basic.ddd.domain.model;

/**
 * 自定义储值金额开关
 * Created by YangKuo on 2017/12/6.
 */
public enum CustomRecharge {

    CLOSE("关闭", (byte) 0),
    OPEND("开启", (byte) 1);

    public final String name;
    public final byte value;

    CustomRecharge(String name, byte value) {
        this.name = name;
        this.value = value;
    }

    public static CustomRecharge getCustomRecharge(byte value) {
        for (CustomRecharge s : CustomRecharge.values()) {
            if (s.value == value) {
                return s;
            }
        }
        return null;
    }

}
